load("//:build_variables.bzl", "COPTS")
load("//tools/lint:linters.bzl", "clang_tidy_test")

package(
    default_visibility = ["//:android_cuttlefish"],
)

cc_library(
    name = "libsensors_simulator",
    srcs = [
        "sensors_simulator.cpp",
    ],
    hdrs = [
        "sensors_simulator.h",
    ],
    copts = COPTS,
    strip_include_prefix = "//cuttlefish",
    deps = [
        "//cuttlefish/common/libs/sensors",
        "//libbase",
        "@libeigen",
    ],
)

clang_tidy_test(
    name = "libsensors_simulator_clang_tidy",
    srcs = [":libsensors_simulator"],
    tags = [
        "clang-tidy",
        "clang_tidy",
    ],
)

cc_library(
    name = "libsensors_hal_proxy",
    srcs = [
        "sensors_hal_proxy.cpp",
    ],
    hdrs = [
        "sensors_hal_proxy.h",
    ],
    copts = COPTS,
    strip_include_prefix = "//cuttlefish",
    deps = [
        ":libsensors_simulator",
        "//cuttlefish/common/libs/sensors",
        "//cuttlefish/common/libs/transport",
        "//cuttlefish/common/libs/utils:device_type",
        "//cuttlefish/host/commands/kernel_log_monitor:kernel_log_monitor_utils",
        "//libbase",
        "@libeigen",
    ],
)

clang_tidy_test(
    name = "libsensors_hal_proxy_clang_tidy",
    srcs = [":libsensors_hal_proxy"],
    tags = [
        "clang-tidy",
        "clang_tidy",
    ],
)

cc_binary(
    name = "sensors_simulator",
    srcs = [
        "main.cpp",
    ],
    copts = COPTS,
    deps = [
        ":libsensors_hal_proxy",
        ":libsensors_simulator",
        "//cuttlefish/common/libs/transport",
        "//cuttlefish/common/libs/utils:device_type",
        "//cuttlefish/host/libs/config:logging",
        "//libbase",
        "@gflags",
        "@libeigen",
    ],
)

clang_tidy_test(
    name = "sensors_simulator_clang_tidy",
    srcs = [":sensors_simulator"],
    tags = [
        "clang-tidy",
        "clang_tidy",
    ],
)
